<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>

<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<div class="row">
	<div class="col-md-6 col-sm-6 col-lg-6 hidden-xs">
		<c:set value="${customerDemoSearch.searchItemList}" var="searchItemList" />
		<%@ include file="/WEB-INF/views/shared/master/searchItem.jsp"%>
	</div>
	<div class="col-md-6 col-sm-6 col-lg-6 col-xs-12 text-right">
		<t:roleButton />
	</div>
</div>

<script type="text/javascript">
function addData(){
	    top.openModal("/admin/acc/customerDemo/customerDemoDetailed","customerDemo_form","测试用户详情-添加",400,240);
}
function editData(){
	var id=getKeyId();
	if(isEditor(id)){
		top.openModal("/admin/acc/customerDemo/customerDemoDetailed?key="+id,"customerDemo_form","测试用户详情-修改",400,240);
	}
}


function selData(){
	var id=getKeyId();
	if(isEditor(id)){
		top.openModal("/admin/acc/customerDemo/customerDemoDetailed?key="+id,"customerDemo_form","测试用户详情-查看",400,240);	
	}
}
function deleteData(){
	var id=getKeyId();
	if(isEditor(id)){
		var url=$.getVirtualPath()+"/admin/acc/customerDemo/delete?key="+id;
		deleteDataEx(url,function(data){
			if(data.resultType=="success"){
				formSubmit();
			}
		});
	}
	
}

function refresh(){
	var url=$.getVirtualPath()+"/admin/acc/customerDemo/index";
	var ajaxPost=true;
	$.post(url,{ajaxPost:ajaxPost},function(res){
		$("#tableContent").html(res);
    	redrawTable();
    	//考虑到测试的时候多个人操作时可能删除数据影响测试结果的对照，就动态的同是刷新测试结果
    	/* refreshResult() */
	});
}

/* function refreshResult(){
	 var id=$("#result table .refreshId:nth-of-type(1)").val();
	    var url=$.getVirtualPath()+"/admin/acc/customerDemo/toTest";
     $.post(url,{key:id},function(res){
     	$("#result").html(res);
     })
} */


</script>